<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <table border="1">
        <caption>标题</caption>
        <thead>
            <tr>
                <th>name</th>
                <th>age</th>
                <th>gender</th>
            </tr>
            <tr>
                <th>name</th>
                <th>age</th>
                <th>gender</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>lili</td>
                <td>20</td>
                <td>girl</td>
            </tr>
            <tr>
                <td>jack</td>
                <td>21</td>
                <td>boy</td>
            </tr>
            <tr>
                <td>lucy</td>
                <td>20</td>
                <td>girl</td>
            </tr>
        </tbody>
        <tbody>
            <tr>
                <td>lili</td>
                <td>20</td>
                <td>girl</td>
            </tr>
            <tr>
                <td>jack</td>
                <td>21</td>
                <td>boy</td>
            </tr>
            <tr>
                <td>lucy</td>
                <td>20</td>
                <td>girl</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td>10</td>
                <td>20</td>
                <td>20</td>
            </tr>
            <tr>
                <td>10</td>
                <td>20</td>
                <td>20</td>
            </tr>
            <tr>
                <td>10</td>
                <td>20</td>
                <td>20</td>
            </tr>
        </tfoot>
    </table>
    <script>
        // console.log(document.body.children[0].children[2].children[1].children[1]);
        const table = document.body.children[0];
        console.log(table.rows);

        console.log(table.tHead.rows);
        console.log(table.tFoot.rows);
        console.log(table.tBodies[0].rows);
        console.log(table.tBodies[1].rows);
    </script>
</body>

</html>